Skip to content

feat(accommodation): surface ratings, facilities and metadata - #8

Merged
akoso merged 4 commits into
mainfrom
feat/accommodation-metadata
Aug 1, 2026
Merged

feat(accommodation): surface ratings, facilities and metadata#8
akoso merged 4 commits into
mainfrom
feat/accommodation-metadata

Conversation

@akoso

@akoso akoso commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Picks up the accommodation metadata the API now stores and returns, and makes the CLI show it.

What changed

Typesopenapi.json snapshot refreshed from production (additive: 210 insertions, 4 changed descriptions). Brings in imageUrl, description, url, the 15-member features enum, externalRating (score + scale + count + source), type / roomDetails on the read path, and locationiqPlaceId on option locations. bun run codegen regenerates cleanly; no existing code broke.

Read pathmna trips show now prints an accommodation table per variant:

Accommodation · Calabria + Sicily
Destination     Option                   Cost      Rating       Details                      Facilities
──────────────  ───────────────────────  ────────  ───────────  ───────────────────────────  ─────────────────────
Split, Croatia  ✓ Field-check Apartment  1200 EUR  8.8/10 (92)  apartment · 2 rooms · 55 m²  Beachfront, Private k…
Split, Croatia    Flat-location probe    500 EUR   4.4/5 (310)  hotel · 1 room               Pool, Free WiFi

Ratings stay in the scale their source published them in — 8.8/10 and 4.4/5 are never normalised or compared against each other. --all-options now changes the human output too (previously it only affected --json); without it you get the selected option per destination.

Write path — no code change needed. mna options add|edit --from-json passes the JSON body straight through, so every new field is already settable. Verified end-to-end against production on a throwaway trip (created, written, read back, deleted): externalRating, features, description, url, imageUrl, type, roomDetails and location.locationiqPlaceId all round-trip.

Skillskills/mna/SKILL.md and both references:

  • ratings/facilities/links go in their own fields, in native units; privateKitchensharedKitchen
  • name is a display name, not a place to stash price, town or working state — commentary belongs in notes
  • a "Heuristics from real sessions" section: estimates aren't decision-grade, cost the trip rather than the room, compare towns before properties when the destination is open, elicit rather than assume (and stop interviewing a user who just wants a pick), forward legs beat backtracks, regional traps, anchors first
  • corrected the location write shape (see below)

Found while verifying

  • The reference doc had the location shape backwards. It said the flat address/latitude/longitude form is silently dropped and coordinates persist only when nested. Production does the opposite: the flat form persists, the nested formattedAddress/coordinates form is dropped and only name survives. Reproduced on both options add and options edit. Corrected in references/cli-and-schemas.md, along with the fact that location is replaced wholesale rather than merged.
  • mna variants add is broken against production — the server rejects a body without dates (400, no message) even though the spec marks only name as required, and the command has no date flags. Reproducible on a fresh trip. Out of scope here, left alone.
  • The event-location example still documents coordinates.latitude/.longitude, but the current spec's CreateEventLocationCoordinatesV1Dto requires lat/lng. Not tested, not changed.

Gates

bun run codegen, bun run typecheck, bun run lint, bun test (138 pass, 0 fail — 10 new), bun run build + node dist/mna.js --version all green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq

Refresh the committed OpenAPI snapshot from production, which brings in the
new accommodation metadata: `imageUrl`, `description`, `url`, the 15-member
`features` enum, `externalRating` (score + scale + count + source), `type` and
`roomDetails` on the read path, and `locationiqPlaceId` on option locations.

`mna trips show` now prints an accommodation table per variant — cost, guest
rating in its source scale (`8.8/10 (92)`, never normalised), type/rooms/size
and facilities — so a shortlist is comparable without `--json`. `--all-options`
now changes the human output too, not just the JSON.

The write path needed no change: `options add|edit --from-json` passes the body
through, verified end-to-end against production (all new fields round-trip).

Skill updates: record ratings in native units, never overload `name` with data
that has its own field, heuristics from a real planning session, and the
corrected location write shape — production keeps the flat
`address`/`latitude`/`longitude` form and silently drops the nested
`formattedAddress`/`coordinates` form the reference previously prescribed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
akoso and others added 3 commits August 1, 2026 22:09
The skill had hardened one planner's circumstances into rules: złoty amounts,
Croatian changeover days, Italian short-stay premiums, Adriatic beaches, a
specific family pickup. Useless to anyone planning from Denver.

Restructured as a five-phase process mapped to the CLI — elicit (anchors,
party, dates, budget + home currency, this-trip preferences, or detect the
"just pick one" mode) → research real availability → structure in MNA (a table
of which command builds which level) → compare end-to-end totals → decide,
select, share. The old "method" and "playbook" sections overlapped heavily and
are folded into it.

Each regional fact became the category of check behind it: changeover days and
minimum stays are "local booking conventions to look up", the Italian premium
is "short-stay penalties", vignettes and ferries are "cost of getting there
beyond fuel or fare", sand rarity is "what the marketing word means locally".
No currency appears anywhere; the process elicits the user's and presents
totals in it. Fuel arithmetic now gives both metric and US customary forms.

What was genuinely universal is kept: real listings before decisions, whole-
trip costing, towns before properties when the destination is open,
elicitation over assumption, native-scale ratings, field semantics.

Same length as before (171 lines). The extracted regional material is good
writing for a planning-experience post, just not for a skill.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
…ersal skill

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
…ns, dates required on variant create)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
@akoso
akoso merged commit 965c886 into main Aug 1, 2026
1 check passed
@akoso
akoso deleted the feat/accommodation-metadata branch August 1, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant